package com.firefly.admin.common.annotations.annotation;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.firefly.admin.common.annotations.aspect.SensitiveSerializer;
import com.firefly.admin.common.enums.SensitiveTypeEnum;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@JacksonAnnotationsInside // 表示自定义自己的注解PrivacyEncrypt
@JsonSerialize(using = SensitiveSerializer.class)
public @interface SensitiveEncrypt {

    //敏感类型  枚举
    SensitiveTypeEnum type();
}
